package com.ynny.Exception.Demo02;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ListMap {
    public static void main(String[] args) {
        List<Map<String,Object>> li = new ArrayList<>();
        HashMap<String, Object> ob = new HashMap<>();
        ob.put("name","张三");
        ob.put("id",1);
        ob.put("age",20);
        li.add(ob);

        HashMap<String, Object> ob2 = new HashMap<>();
        ob2.put("name","李四");
        ob2.put("id",2);
        ob2.put("age",24);
        li.add(ob2);

        for (Map<String, Object> map : li){
            System.out.println(map);

        }

    }
}
